<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>jQuery 插件学习</title>

    <script src="https://cdn.staticfile.org/jquery/2.0.2/jquery.min.js" type="text/javascript"></script>
    <script src="https://static.runoob.com/assets/jquery/jquery.growl/javascripts/jquery.growl.js"
            type="text/javascript"></script>
    <link href="https://static.runoob.com/assets/jquery/jquery.growl/stylesheets/jquery.growl.css" rel="stylesheet"
          type="text/css"/>

    <script type="text/javascript">
        $(function () {
            $.growl({
                title: "消息标题",
                message: "消息内容!"
            });

            $('.error').click(function (event) {
                event.preventDefault();
                event.stopPropagation();
                return $.growl.error({
                    title: "错误标题",
                    message: "错误消息内容!"
                });
            });

            $('.notice').click(function (event) {
                event.preventDefault();
                event.stopPropagation();
                return $.growl.notice({
                    title: "提醒标题",
                    message: "提醒消息内容!"
                });
            });

            return $('.warning').click(function (event) {
                event.preventDefault();
                event.stopPropagation();
                return $.growl.warning({
                    title: "警告标题",
                    message: "警告消息内容!"
                });
            });
        });
    </script>

</head>
<body>
<p>jQuery Growl 插件(消息提醒) 允许您很容易地在一个覆盖层显示反馈消息。</p> 
  <p>消息会在一段时间后自动消失，不需要单击"确定"按钮等。</p>
  <p>用户也可以通过移动鼠标或点击关闭按钮加快隐藏信息。</p>
   
<ul>
    <li>
        <a class="error" href="#">错误!</a>
    </li>
    <li>
        <a class="notice" href="#">提醒!</a>
    </li>
    <li>
        <a class="warning" href="#">警告!</a>
    </li>
</ul>

</body>
</html>
